package com.huawei.bitfun.insight.type.converter;

import com.huawei.bitfun.insight.type.DataSourceTable;

import java.sql.ResultSet;
import java.sql.SQLException;

public class DataSourceConverter implements RowConverter<DataSourceTable> {

    @Override
    public DataSourceTable mapToRow(ResultSet rs) throws SQLException {
        DataSourceTable ds = new DataSourceTable();
        ds.setId(rs.getInt("id"));
        ds.setName(rs.getString("name"));
        ds.setPath(rs.getString("path"));
        return ds;
    }
}
